package org.example.auth.service;

import org.example.auth.contract.request.AuthorityRequestForRoleBind;
import org.example.auth.model.entity.Authority;
import org.example.auth.model.entity.RoleAuthority;

import java.util.List;

public interface RoleAuthorityService {
    /**
     * 解绑role下相应权限
     *
     * @param roleId 权限ID
     */
    void deleteRoleAuthorityByRoleId(Long roleId);

    List<RoleAuthority> findByRoleId(Long roleId);

    /**
     * 删除权限对应的缓存
     */
    void deleteRoleAuthorityByAuthority(Authority authority);

    /**
     * 单个角色批量操作权限
     */
    void batchBindRoleAuthority(AuthorityRequestForRoleBind request);

    /**
     * 单个角色绑定权限
     */
    void bindRoleAuthority(Long roleId, Long authorityId);

    /**
     * 单个角色解绑权限
     */
    void unBindRoleAuthority(Long roleId, Long authorityId);
}
